"""Add session token

Revision ID: add_session_token
Revises: 
Create Date: 2024-03-21

"""
from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision = 'add_session_token'
down_revision = None
branch_labels = None
depends_on = None

def upgrade():
    # 添加 session_token 列
    op.add_column('user', sa.Column('session_token', sa.String(100), unique=True, nullable=True))

def downgrade():
    # 删除 session_token 列
    op.drop_column('user', 'session_token') 